package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TableBillingRulesMapper;
import com.ruoyi.system.domain.TableBillingRules;
import com.ruoyi.system.service.ITableBillingRulesService;

/**
 * 桌台计费规则（含联系方式）Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-19
 */
@Service
public class TableBillingRulesServiceImpl implements ITableBillingRulesService
{
    @Autowired
    private TableBillingRulesMapper tableBillingRulesMapper;

    /**
     * 通过id查询桌台计费规则
     *
     * @param id 桌台计费规则主键
     * @return  桌台计费规则
     */
    @Override
    public TableBillingRules selectTableBillingRulesById(Long id)
    {
        return tableBillingRulesMapper.selectTableBillingRulesById(id);
    }

    /**
     * 查询桌台计费规则列表
     *
     * @param tableBillingRules 桌台计费规则
     * @return 桌台计费规则
     */
    @Override
    public List<TableBillingRules> selectTableBillingRulesList(TableBillingRules tableBillingRules)
    {
        return tableBillingRulesMapper.selectTableBillingRulesList(tableBillingRules);
    }

    /**
     * 新增桌台计费规则
     *
     * @param tableBillingRules 桌台计费规则
     * @return 结果
     */
    @Override
    public int insertTableBillingRules(TableBillingRules tableBillingRules)
    {
        return tableBillingRulesMapper.insertTableBillingRules(tableBillingRules);
    }

    /**
     * 修改桌台计费规则
     *
     * @param tableBillingRules 桌台计费规则
     * @return 结果
     */
    @Override
    public int updateTableBillingRules(TableBillingRules tableBillingRules)
    {
        return tableBillingRulesMapper.updateTableBillingRules(tableBillingRules);
    }

    /**
     * 通过id批量删除桌台计费规则信息
     *
     * @param ids 需要删除的桌台计费规则主键
     * @return 结果
     */
    @Override
    public int deleteTableBillingRulesByIds(Long[] ids)
    {
        return tableBillingRulesMapper.deleteTableBillingRulesByIds(ids);
    }

    /**
     * 通过id删除桌台计费规则信息
     *
     * @param id 桌台计费规则主键
     * @return 结果
     */
    @Override
    public int deleteTableBillingRulesById(Long id)
    {
        return tableBillingRulesMapper.deleteTableBillingRulesById(id);
    }
}
